//
//  KNText.h
//


#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/**
 * 文本helper
 */
@interface KNText : NSObject


/**
 * 创建富文本
 */
+ (NSMutableAttributedString *)attributedString:(NSString *)text fontSize:(CGFloat)size color:(UIColor *)color;

/**
 * 创建富文本 bold
 */
+ (NSMutableAttributedString *)attributedBoldString:(NSString *)text fontSize:(CGFloat)size color:(UIColor *)color;



/**
 * 创建富文本 fontName
 */
+ (NSMutableAttributedString *)attributedIconString:(NSString *)text fontName:(NSString *)fontName fontSize:(CGFloat)size;

/**
 * 创建富文本 fontName & color
 */
+ (NSMutableAttributedString *)attributedIconString:(NSString *)text fontName:(NSString *)fontName fontSize:(CGFloat)size color:(UIColor *)color;

/**
 * 创建固定宽度的空白
 */
+ (NSAttributedString *)fixedWidthSpace:(CGFloat)width;



/**
 * 行间距
 */
+ (void)lineSpacingStr:(NSMutableAttributedString *)attributedStr
               spacing:(CGFloat)lineSpacing;



@end

NS_ASSUME_NONNULL_END
